/*
 * CustomerBO.java
 *
 * Created on February 12, 2007, 9:10 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.group1E.data;

/**
 *
 * @author tkulbeth
 */
public class CustomerBO {
    
    private String custID = "";
    private String custFirstName = "";
    private String custMI = "";
    private String custLastName = "";
    private String custPhone = "";
    private String custEmail = "";
    private String custAddr = "";
    private String custCity = "";
    private String custState = "";
    private String custZip = "";
    private MembershipBO custMembership = null;
    private boolean alreadyInDB = false;
    private boolean isDirty = true;
    
    /** Creates a new instance of CustomerBO */
    CustomerBO(String custID) {
        setCustID(custID);
        setAlreadyInDB(false);
        setIsDirty(true);
    }
    
    CustomerBO(String id, String fName, String mi, String lName, String addr, String city, 
            String state, String zip, String phone, String email, MembershipBO member){
        setCustID(id);
        setCustFirstName(fName);
        setCustMI(mi);
        setCustLastName(lName);
        setCustPhone(phone);
        setCustEmail(email);
        setCustAddr(addr);
        setCustCity(city);
        setCustState(state);
        setCustZip(zip);
        setCustMembership(member);
    }

    public String getCustID() {
        return custID;
    }

    public void setCustID(String custID) {
        setIsDirty(true);
        this.custID = custID;
    }

    public String getCustFirstName() {
        return custFirstName;
    }

    public void setCustFirstName(String custFirstName) {
        setIsDirty(true);
        this.custFirstName = custFirstName;
    }

    public String getCustMI() {
        return custMI;
    }

    public void setCustMI(String custMI) {
        setIsDirty(true);
        this.custMI = custMI;
    }

    public String getCustLastName() {
        return custLastName;
    }

    public void setCustLastName(String custLastName) {
        setIsDirty(true);
        this.custLastName = custLastName;
    }
    
    public String getCustFullName() {
        String fullName = new String(this.getCustFirstName() + " " + this.getCustMI() + " " + this.getCustLastName());
        return fullName;
    }

    public String getCustPhone() {
        return custPhone;
    }

    public void setCustPhone(String custPhone) {
        setIsDirty(true);
        this.custPhone = custPhone;
    }

    public String getCustEmail() {
        return custEmail;
    }

    public void setCustEmail(String custEmail) {
        setIsDirty(true);
        this.custEmail = custEmail;
    }

    public String getCustAddr() {
        return custAddr;
    }

    public void setCustAddr(String custAddr) {
        setIsDirty(true);
        this.custAddr = custAddr;
    }

    public String getCustCity() {
        return custCity;
    }

    public void setCustCity(String custCity) {
        setIsDirty(true);
        this.custCity = custCity;
    }

    public String getCustState() {
        return custState;
    }

    public void setCustState(String custState) {
        setIsDirty(true);
        this.custState = custState;
    }

    public String getCustZip() {
        return custZip;
    }

    public void setCustZip(String custZip) {
        setIsDirty(true);
        this.custZip = custZip;
    }

    public MembershipBO getCustMembership() {
        return custMembership;
    }

    public void setCustMembership(MembershipBO member) {
        setIsDirty(true);
        this.custMembership = member;
    }
    
    public void setAlreadyInDB(boolean is){
        setIsDirty(true);
        this.alreadyInDB = is;
    }

    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    public boolean isIsDirty() {
        return isDirty;
    }

    public void setIsDirty(boolean isDirty) {
        this.isDirty = isDirty;
    }
}
